//
//  MVModel.m
//  __PRODUCTNAME__
//
//  Created by QC.L on 16/08/15
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "MVModel.h"
#import "MVData.h"
@implementation MVModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"default"]) {
        _mv_default = [value integerValue];
    }
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
     _data = [MVData modelWithDic:value];
    }
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"%ld", _code];
}
@end
